package com.bwhx.eruler.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.bwhx.eruler.bean.EChartsResult;
import com.bwhx.eruler.bean.OfflineOrder;
import com.bwhx.eruler.bean.Order;
import com.bwhx.eruler.bean.Page;
import com.bwhx.eruler.dao.OfflineOrderDao;

/**
 * @Description:
 */
@Repository
public class OfflineOrderDaoImpl extends BaseDaoImpl<OfflineOrder> implements OfflineOrderDao {
	public OfflineOrderDaoImpl() {
		this.setNs("com.bwhx.eruler.mapper.OfflineOrderMapper.");
	}




	@Override
	public List<OfflineOrder> list(Page p) {
		return getSqlSession().selectList("com.bwhx.eruler.mapper.OfflineOrderMapper." + "list",p);

	}


	@Override
	public Integer count(OfflineOrder oo) {
		Object selectOne = getSqlSession().selectOne("com.bwhx.eruler.mapper.OfflineOrderMapper." + "count",oo);
		if(null!=selectOne && selectOne instanceof Integer){
			return (int)selectOne;
		}
		return 0;
	}




	@Override
	public List<EChartsResult> countRuler(String year) {
		return getSqlSession().selectList("com.bwhx.eruler.mapper.OfflineOrderMapper." + "countRuler",year);
	}




	@Override
	public List<EChartsResult> countSeller() {
		return getSqlSession().selectList("com.bwhx.eruler.mapper.OfflineOrderMapper." + "countSeller");

	}


	
	
}
